// 分类管理路由模块 /admin/product/baseCategoryTrademark/xxx
const express = require('express')
const { authMiddleware } = require('../../middlewares/authMiddleware');
const { apiPathMiddleware } = require('../../middlewares/apiPathMiddleware');
const attrController = require('../../controllers/product/attrController');

const router = express.Router();

// 获取某个分类的属性列表
router.get('/attrInfoList/:category1Id/:category2Id/:category3Id', 
  authMiddleware, attrController.getAttrInfoList)
// 添加或修改属性
router.post('/saveAttrInfo', 
  authMiddleware, apiPathMiddleware('attr/save'), attrController.saveAttrInfo)
// 删除属性
router.delete('/deleteAttr/:attrId', 
  authMiddleware, apiPathMiddleware('attr/remove'), attrController.deleteAttr)

module.exports = router
